package io.kimmking.dubbo.demo.provider;

import io.kimmking.dubbo.demo.api.Order;
import io.kimmking.dubbo.demo.api.OrderService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;


@RefreshScope
@DubboService(version = "1.0.0",loadbalance = "ylbl")
public class OrderServiceImpl implements OrderService {

    @Value("${name:abc}")
    private String name;

    @Override
    public Order findOrderById(int id) {
        return new Order(id, "Cuijing" + System.currentTimeMillis()+":"+name, 9.9f);
    }
}
